﻿namespace Borg.Framework
{
    public abstract class AbstractView : IView
    {
        private PlugInfo _plug;

        public virtual void ViewPlugged(object s, PlugEventArgs args)
        {
            _plug = args.PlugInfo;
        }

        public abstract System.Windows.Forms.Control Control { get; }

        protected ExtensionInfo ExtensionInfo
        {
            get { return _plug.ExtensionInfo; }
        }

        public string Name
        {
            get { return (string)_plug.PlugTypeInfo.ParamValues["Name"].Value; }
        }

        protected PlugInfo ViewPlug
        {
            get { return _plug; }
        }
    }
}

